$OpenBSD: patch-Scripts_sql-update-1_3_16_to_1_3_17-mysql_sh,v 1.1 2012/08/17 09:59:08 sebastia Exp $
--- Scripts/sql-update-1.3.16_to_1.3.17-mysql.sh.orig	Thu Jul 26 19:47:19 2012
+++ Scripts/sql-update-1.3.16_to_1.3.17-mysql.sh	Thu Jul 26 19:49:35 2012
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 set -e
 
@@ -13,15 +13,15 @@ set -e
 defaultusername=$USER
 defaulthostname=127.0.0.1
 defaultdatabase=$USER
-indextable=$(su - sogo -c "defaults read sogod OCSFolderInfoURL" | awk -F/ '{print $NF}')
+indextable=$(defaults read sogod OCSFolderInfoURL | awk -F/ '{print $NF}')
 if [ -z "$indextable" ]; then
   echo "Couldn't fetch OCSFolderInfoURL value, aborting" >&2
   exit 1
 fi
 
-read -p "Username ($defaultusername): " username
-read -p "Hostname ($defaulthostname): " hostname
-read -p "Database ($defaultdatabase): " database
+read username?"Username ($defaultusername): "
+read hostname?"Hostname ($defaulthostname): "
+read database?"Database ($defaultdatabase): "
 
 if [ -z "$username" ]
 then
@@ -40,7 +40,7 @@ then
 
 sqlscript=""
 
-function growVC() {
+growVC() {
     oldIFS="$IFS"
     IFS=" "
     part="`echo -e \"ALTER TABLE $table MODIFY c_cycleinfo mediumtext;\\n\"`";
